
***************************************************
**VARIATION IN RELIGIOSITY IN TURKEY
***************************************************

clear
set more off
import delimited using "Livny_POQ2020_Districts.csv", clear varnames(1)

***************************************************
**Figure 1a. Variation in Self-Reported Religiosity (2010-2015)
***************************************************
replace devout=devout*100
format devout %9.2f

*using shapefile ("turkey_administrativelevels0_1_2") from https://data.humdata.org/dataset/turkey-administrative-boundaries-levels-0-1-2
*ssc install shp2dta
*shp2dta using tur_polbnda_adm2, database(ilce) coordinates(ilcecoord) genid(id)

gen id=humdata_id

spmap devout using "ilcecoord.dta", id(id) fcolor(gs15 gs12 gs9 gs6 gs3) ocolor(black black black black black black black) osize(vthin vthin vthin vthin vthin vthin vthin vthin) clnumber(5) clbreaks(0 20 40 60 80 100) mosize(vthin vthin vthin vthin vthin vthin vthin vthin) ndfcolor(white) ndocolor(gs10) ndsize(vthin) legstyle(2) legend(title("Devout (%)", size(huge)) ring(1) position(3) margin(vsmall) size(vlarge) colgap(0) rowgap(-2) symysize(8) symxsize(8) region(fcolor(white) lcolor(none) lwidth(none) margin(b=3 l=3))) 

***************************************************
**Figure 1b. Variation in Islamic Party Vote-Share in General Elections (2002-2018)
***************************************************
format akp_general %9.2f

spmap akp_general using "ilcecoord.dta", id(id) fcolor(gs15 gs12 gs9 gs6 gs3) ocolor(black black black black black black black) osize(vthin vthin vthin vthin vthin vthin vthin vthin) clnumber(5) clbreaks(0 15 30 45 60 75) mosize(vthin vthin vthin vthin vthin vthin vthin vthin) ndfcolor(white) ndocolor(gs10) ndsize(vthin)  legstyle(2) legend(title("AKP Votes (%)", size(huge)) ring(1) position(3) margin(vsmall) size(vlarge) colgap(0) rowgap(-2) symysize(8) symxsize(8) region(fcolor(white) lcolor(none) lwidth(none) margin(b=3 l=3))) 

***************************************************
**DESCRIPTIVE STATISTICS
***************************************************

import delimited using "Livny_POQ2020_Districts.csv", clear varnames(1)

sum pctchange_ramadan, detail
tab pctchange_ramadan_dummy

sum pctchange_ramadan placebo*

*Regional variation
gen bolgeid=.
replace bolgeid=1 if ilid==34
replace bolgeid=2 if ilid==10
replace bolgeid=2 if ilid==17
replace bolgeid=2 if ilid==22
replace bolgeid=2 if ilid==39
replace bolgeid=2 if ilid==59
replace bolgeid=3 if ilid==3
replace bolgeid=3 if ilid==9
replace bolgeid=3 if ilid==20
replace bolgeid=3 if ilid==35
replace bolgeid=3 if ilid==43
replace bolgeid=3 if ilid==45
replace bolgeid=3 if ilid==48
replace bolgeid=3 if ilid==64
replace bolgeid=4 if ilid==11
replace bolgeid=4 if ilid==14
replace bolgeid=4 if ilid==16
replace bolgeid=4 if ilid==81
replace bolgeid=4 if ilid==26
replace bolgeid=4 if ilid==41
replace bolgeid=4 if ilid==54
replace bolgeid=4 if ilid==77
replace bolgeid=5 if ilid==6
replace bolgeid=5 if ilid==70
replace bolgeid=5 if ilid==42
replace bolgeid=6 if ilid==1
replace bolgeid=6 if ilid==7
replace bolgeid=6 if ilid==15
replace bolgeid=6 if ilid==31
replace bolgeid=6 if ilid==32
replace bolgeid=6 if ilid==46
replace bolgeid=6 if ilid==33
replace bolgeid=6 if ilid==80
replace bolgeid=7 if ilid==68
replace bolgeid=7 if ilid==38
replace bolgeid=7 if ilid==71
replace bolgeid=7 if ilid==40
replace bolgeid=7 if ilid==50
replace bolgeid=7 if ilid==51
replace bolgeid=7 if ilid==58
replace bolgeid=7 if ilid==66
replace bolgeid=8 if ilid==5
replace bolgeid=8 if ilid==74
replace bolgeid=8 if ilid==18
replace bolgeid=8 if ilid==19
replace bolgeid=8 if ilid==78
replace bolgeid=8 if ilid==37
replace bolgeid=8 if ilid==55
replace bolgeid=8 if ilid==57
replace bolgeid=8 if ilid==60
replace bolgeid=8 if ilid==67
replace bolgeid=9 if ilid==8
replace bolgeid=9 if ilid==28
replace bolgeid=9 if ilid==29
replace bolgeid=9 if ilid==52
replace bolgeid=9 if ilid==53
replace bolgeid=9 if ilid==61
replace bolgeid=10 if ilid==4
replace bolgeid=10 if ilid==75
replace bolgeid=10 if ilid==69
replace bolgeid=10 if ilid==24
replace bolgeid=10 if ilid==25
replace bolgeid=10 if ilid==76
replace bolgeid=10 if ilid==36
replace bolgeid=11 if ilid==12
replace bolgeid=11 if ilid==13
replace bolgeid=11 if ilid==23
replace bolgeid=11 if ilid==30
replace bolgeid=11 if ilid==44
replace bolgeid=11 if ilid==49
replace bolgeid=11 if ilid==62
replace bolgeid=11 if ilid==65
replace bolgeid=12 if ilid==2
replace bolgeid=12 if ilid==72
replace bolgeid=12 if ilid==21
replace bolgeid=12 if ilid==27
replace bolgeid=12 if ilid==79
replace bolgeid=12 if ilid==47
replace bolgeid=12 if ilid==63
replace bolgeid=12 if ilid==56
replace bolgeid=12 if ilid==73
label define bolge 1 "Istanbul" 2 "Western Marmara" 3 "Aegean" 4 "Eastern Marmara" 5 "Western Anatolia" 6 "Mediterranean" 7 "Central Anatolia" 8 "Western Black Sea" 9 "Eastern Black Sea" 10 "Northeastern Anatolia" 11 "Central Eastern Anatolia" 12 "Southeastern Anatolia" 13 "International"
label values bolgeid bolge

table bolge, contents(mean pctchange_ramadan mean pctchange_ramadan_dummy)

***************************************************
**Appendix Figure A2. Map of percent change in across all years within districts
***************************************************

import delimited using "Livny_POQ2020_Districts.csv", clear varnames(1)

*using shapefile ("turkey_administrativelevels0_1_2") from https://data.humdata.org/dataset/turkey-administrative-boundaries-levels-0-1-2
*ssc install shp2dta
*shp2dta using tur_polbnda_adm2, database(ilce) coordinates(ilcecoord) genid(id)

gen id=humdata_id

gen pctchange=pctchange_ramadan
format pctchange %9.2f

spmap pctchange using "ilcecoord.dta", id(id) fcolor(Greys) clnumber(8)  mosize(vthin) ocolor(black) osize(thin)  ndfcolor(white) ndocolor(gs10) ndsize(thin) legstyle(2) legend(title("{&Delta} Luminosity (%)", size(huge)) ring(1) position(3) margin(vsmall) size(large) colgap(0) rowgap(-2) symysize(6) symxsize(6) region(fcolor(white) lcolor(none) lwidth(none) margin(b=3 l=3))) 

***************************************************
**VALIDITY CHECKS ACROSS INDIVIDUALS
***************************************************

import delimited using "Livny_POQ2020_Individuals.csv", clear varnames(1)

global fixed_effects i.survey i.locale
global individual_controls female i.age_cat i.educ_cat i.income_cat sunni turkish 

***************************************************
**Table 1. Predicting Individual Religiosity with Ramadan Luminosity in Home Districts
***************************************************

reg faststd pctchangestd $fixed_effects, cluster(humdata_id)
estimates store indiv2a
reg faststd pctchangestd $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv2b

reg relconservativestd pctchangestd $fixed_effects, cluster(humdata_id)
estimates store indiv3a
reg relconservativestd pctchangestd $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv3b

reg coverstd pctchangestd $fixed_effects, cluster(humdata_id)
estimates store indiv5a
reg coverstd pctchangestd $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv5b

reg akpstd pctchangestd $fixed_effects, cluster(humdata_id)
estimates store indiv6a
reg akpstd pctchangestd  $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv6b

label variable pctchangestd "\textDelta Luminosity"
label variable age_cat "Age"
label variable female "Female"
label variable educ_cat "Education"
label variable income_cat "Income"

esttab indiv2a indiv2b indiv3a indiv3b indiv5a indiv5b indiv6a indiv6b, replace label numbers nomtitle nodepvars  b(%12.3f) p(%12.3f) r2(%12.3f) star(* 0.1 ** 0.05 *** 0.01) indicate("\midrule Survey FEs = *survey*" "Clustered SEs = 0.locale" "Urbanization = 1.locale" "Demographics = female", label(\checkmark))  mgroups("\clb{c}{Fast}" "\clb{c}{Devout}"  "\clb{c}{Cover}" "\clb{c}{AKP}", pattern(1 0 1 0 1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) prefoot("\addlinespace[1em]") posthead("\midrule")  sfmt(%12.0f) stat(r2 N_clust N, labels("\midrule R\textsuperscript{2}" "Districts" "\textit{N}") fmt(%12.3f %12.0f %12.0f)) nonote rename(relconservativestd faststd coverstd faststd akpstd faststd) noconstant nogaps  drop(2.locale *age_cat* *educ_cat* *income_cat* sunni turkish _cons)

***************************************************
**Table A1. Improvements in Model Fit: Predictions of Individual Religiosity
***************************************************

quietly: reg faststd $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv_appendix1a
scalar m1 = e(ll)
quietly: reg faststd pctchangestd $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv_appendix2a
scalar m2 = e(ll)
di "chi2(2) = " 2*(m2-m1)
di "Prob > chi2 = "chi2tail(2, 2*(m2-m1))
scalar pv=chi2tail(2, 2*(m2-m1))
estadd scalar pv
scalar chi=2*(m2-m1)
estadd scalar chi

quietly: reg relconservativestd $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv_appendix1b
scalar m1 = e(ll)
quietly: reg relconservativestd pctchangestd $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv_appendix2b
scalar m2 = e(ll)
di "chi2(2) = " 2*(m2-m1)
di "Prob > chi2 = "chi2tail(2, 2*(m2-m1))
scalar pv=chi2tail(2, 2*(m2-m1))
estadd scalar pv
scalar chi=2*(m2-m1)
estadd scalar chi

quietly: reg coverstd $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv_appendix1c
scalar m1 = e(ll)
quietly: reg coverstd pctchangestd $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv_appendix2c
scalar m2 = e(ll)
di "chi2(2) = " 2*(m2-m1)
di "Prob > chi2 = "chi2tail(2, 2*(m2-m1))
scalar pv=chi2tail(2, 2*(m2-m1))
estadd scalar pv
scalar chi=2*(m2-m1)
estadd scalar chi

quietly: reg akpstd  $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv_appendix1d
scalar m1 = e(ll)
quietly: reg akpstd pctchangestd  $individual_controls $fixed_effects, cluster(humdata_id)
estimates store indiv_appendix2d
scalar m2 = e(ll)
di "chi2(2) = " 2*(m2-m1)
di "Prob > chi2 = "chi2tail(2, 2*(m2-m1))
scalar pv=chi2tail(2, 2*(m2-m1))
estadd scalar pv
scalar chi=2*(m2-m1)
estadd scalar chi

label variable pctchangestd "\textDelta Luminosity"
label variable female "Female"
label variable sunni "Sunni Muslim"
label variable turkish "Turkish Ethnicity"

esttab indiv_appendix2a indiv_appendix1a indiv_appendix2b indiv_appendix1b indiv_appendix2c indiv_appendix1c indiv_appendix2d indiv_appendix1d, replace booktabs order(pctchangestd female 2.age_cat 3.age_cat  2.educ_cat 3.educ_cat  2.income_cat 3.income_cat 4.income_cat 5.income_cat 6.income_cat sunni turkish 1.locale 2.locale _cons) indicate("\midrule Survey FEs = *survey*" "Clustered SEs = 0.locale", label(\checkmark))  stat(r2 N_clust N chi pv, labels("R\textsuperscript{2}" "Districts" "\textit{N}" "\midrule \textit{\textchi}\textsuperscript{2}" "p-value") fmt(%12.3f %12.0f %12.0f %12.1f %12.3f)) coeflabels(2.age_cat "- 29-43" 3.age_cat "- 44+" 2.educ_cat "- High School" 3.educ_cat "- University" 2.income_cat "- 301-700" 3.income_cat "- 701-1200" 4.income_cat "- 1201-2000" 5.income_cat "- 2001-3000"  6.income_cat "- 3000+" 1.locale "- Town" 2.locale "- City" pctchangestd "\textDelta Luminosity" female "Female" sunni "Sunni" turkish "Turkish") numbers nomtitle nodepvars  b(%12.3f) p(%12.3f) r2(%12.3f) sfmt(%12.0f) star(* 0.1 ** 0.05 *** 0.01) mgroups("\clb{c}{Fast}" "\clb{c}{Devout}"  "\clb{c}{Cover}" "\clb{c}{AKP}", pattern(1 0 1 0 1 0 1 0 1 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) posthead("\midrule") nonote nogaps refcat(2.age_cat "Age:" 2.educ_cat "Education:" 2.income_cat "Income (TL):" 1.locale "Urbanization:", nolabel) drop(1.age_cat 1.educ_cat 1.income_cat _cons) not

***************************************************
**VALIDITY CHECKS ACROSS DISTRICTS
***************************************************

***************************************************
**Figure 2. Ramadan Luminosity and Religiosity, across Districts
***************************************************

import delimited using "Livny_POQ2020_Districts.csv", clear varnames(1)

global fixed_effects i.ilid
global controls urban literacy university

reg faststd pctchangestd, vce(cluster humdata_id)
estimates store ilce2a
reg faststd pctchangestd $controls , vce(cluster humdata_id)
estimates store ilce2b

reg relconservativestd pctchangestd, vce(cluster humdata_id)
estimates store ilce3a
reg relconservativestd pctchangestd $controls , vce(cluster humdata_id)
estimates store ilce3b

reg coverstd pctchangestd , vce(cluster humdata_id)
estimates store ilce5a
reg coverstd pctchangestd  $controls , vce(cluster humdata_id)
estimates store ilce5b

reg  akpstd pctchangestd, vce(cluster humdata_id)
estimates store ilce6a
reg  akpstd pctchangestd $controls, vce(cluster humdata_id)
estimates store ilce6b

coefplot (ilce2a\ ilce2b\ ilce3a\ ilce3b\ ilce5a\ ilce5b\ ilce6a \ ilce6b, msymbol(circle) msize(small) mlcolor(gs2) mfcolor(white) mlwidth(thin)), keep(pctchangestd) aseq swapnames coeflabels(ilce2a = "{bf:Fast                     }" ilce2b = "{it:+ Controls}" ilce3a = "{bf:Devout               }" ilce3b = "{it:+ Controls}" ilce5a = "{bf:Cover                 }" ilce5b = "{it:+ Controls}" ilce6a =  "{bf:AKP                    }" ilce6b = "{it:+ Controls}", labsize(medium) notick) xtitle("Standardized Coefficients", size(medlarge) margin(small)) legend(off) xline(0, lwidth(medium) lcolor(black)) levels(99 95 90) ciopts(lcolor(gs12 gs8 gs4) lwidth(vthick vthick vthick))  grid(between glwidth(vthin) glcolor(gs12)) noeqlabels xlabel(, notick)

***************************************************
**VALIDITY CHECKS ACROSS PROVINCES
***************************************************

***************************************************
**Figure 3. Changes in Ramadan Night-Lights and Self-Reported Fasting
***************************************************

import delimited using "Livny_POQ2020_Provinces.csv", clear varnames(1)

pwcorr pctchange_ramadan faststd relconservativestd coverstd reldevout devoutstd akpstd, sig

reg faststd pctchange_ramadan, vce(clust ilid)
reg relconservativestd pctchange_ramadan, vce(clust ilid)
reg coverstd pctchange_ramadan, vce(clust ilid)
reg devoutstd pctchange_ramadan, vce(clust ilid)
reg akpstd pctchange_ramadan, vce(clust ilid)

format pctchange_ramadan %12.0f
replace pctchange_ramadan=pctchange_ramadan/100

twoway (scatter fast pctchange_ramadan if pctchange_ramadan<50, msymbol(none) mlabel(ilname) mlabsize(small) mlabposition(12)) (lfit fast pctchange_ramadan  if pctchange_ramadan<50, range(-12 40) lcolor(black) lwidth(thin) lpattern(dash)), xline(0, lwidth(vthin) lcolor(black) lpattern(solid)) ytitle("Days Fasted (Average)", size(medlarge) margin(small)) xtitle("{&Delta} Ramadan Luminosity (%)", size(medlarge) margin(small)) legend(off) xlabel(-10 0 10 20 30 40, labsize(medium) angle(horiz) notick format(%9.0f)) ylabel(10 15 20 25 30,labsize(medium) notick angle(horiz)) yscale(range(9 31)) xscale(range(-12 40))

***************************************************
**PPLACEBO TESTS
***************************************************

***************************************************
**Placebo Tests across individuals
***************************************************

import delimited using "Livny_POQ2020_Individuals.csv", clear varnames(1)

pwcorr faststd relconservativestd coverstd akpstd pctchangestd placebo*, sig

global fixed_effects i.survey i.locale
global individual_controls female i.age_cat i.educ_cat i.income_cat sunni turkish 

reg placebo1 faststd $individual_controls $fixed_effects, cluster(humdata_id)
reg placebo1 relconservativestd $individual_controls $fixed_effects, cluster(humdata_id)
reg placebo1 coverstd $individual_controls $fixed_effects, cluster(humdata_id)
reg placebo1 akpstd $individual_controls $fixed_effects, cluster(humdata_id)

reg placebo3 faststd $individual_controls $fixed_effects, cluster(humdata_id)
reg placebo3 relconservativestd $individual_controls $fixed_effects, cluster(humdata_id)
reg placebo3 coverstd $individual_controls $fixed_effects, cluster(humdata_id)
reg placebo3 akpstd $individual_controls $fixed_effects, cluster(humdata_id)

***************************************************
**Placebo Tests across districts
***************************************************

import delimited using "Livny_POQ2020_Districts.csv", clear varnames(1)

global fixed_effects i.ilid
global controls urban literacy university

pwcorr faststd relconservativestd coverstd akpstd pctchangestd placebo*, sig

reg placebo2 faststd $controls , vce(cluster ilid)
reg placebo2 relconservativestd $controls , vce(cluster ilid)
reg placebo2 coverstd $controls , vce(cluster ilid)
reg placebo2 akpstd $controls , vce(cluster ilid)

reg placebo8 faststd $controls , vce(cluster ilid)
reg placebo8 relconservativestd $controls , vce(cluster ilid)
reg placebo8 coverstd $controls , vce(cluster ilid)
reg placebo8 akpstd $controls , vce(cluster ilid)

***************************************************
**VALIDITY OVER TIME
***************************************************

***************************************************
**Table A2: Annual Changes in Ramadan Luminosity, Validity Tests
***************************************************

import delimited using "Livny_POQ2020_Districts.csv", clear varnames(1)

pwcorr pctchange_ramadan_* faststd relconservativestd coverstd akpstd, sig

quietly: estpost correlate pctchange_ramadan_2012 faststd relconservativestd coverstd akpstd
estimates store corr2012
quietly: estpost correlate pctchange_ramadan_2013 faststd relconservativestd coverstd akpstd
estimates store corr2013
quietly: estpost correlate pctchange_ramadan_2014 faststd relconservativestd coverstd akpstd
estimates store corr2014
quietly: estpost correlate pctchange_ramadan_2015 faststd relconservativestd coverstd akpstd
estimates store corr2015
quietly: estpost correlate pctchange_ramadan_2016 faststd relconservativestd coverstd akpstd
estimates store corr2016
quietly: estpost correlate pctchange_ramadan_2017 faststd relconservativestd coverstd akpstd
estimates store corr2017
quietly: estpost correlate pctchange_ramadan_2018 faststd relconservativestd coverstd akpstd
estimates store corr2018
quietly: estpost correlate pctchange_ramadan_2019 faststd relconservativestd coverstd akpstd
estimates store corr2019

label variable faststd "Fast"
label variable relconservativestd "Devout"
label variable coverstd "Cover"
label variable akpstd "AKP"

esttab corr2012 corr2013 corr2014 corr2015 corr2016 corr2017 corr2018 corr2019, nonote mtitles ("(2012)" "(2013)" "(2014)" "(2015)" "(2016)" "(2017)" "(2018)" "(2019)")  noobs b(%12.3f) p(%12.3f)  nonumbers compress label replace booktabs nodepvars star(* 0.1 ** 0.05 *** 0.01) posthead("\midrule") noconstant nogaps mgroups("\clb{c}{\textDelta Luminosity}", pattern(1 0 0 0 0 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))

***************************************************
**Table 2: Changes in Ramadan Luminosity and Religiosity, Panel Data
***************************************************

import delimited using "Livny_POQ2020_District_Years.csv", clear varnames(1)

global fixed_effects fe
global controls urban literacy university

xtset humdata_id year

xtreg relconservativestd pctchangestd, vce(cluster humdata_id)
estimates store temp2a
xtreg relconservativestd pctchangestd $controls, vce(cluster humdata_id)
estimates store temp2b
xtreg relconservativestd pctchangestd, fe vce(cluster humdata_id)
estimates store temp2c

xtreg coverstd pctchangestd, vce(cluster humdata_id)
estimates store temp3a
xtreg coverstd pctchangestd $controls, vce(cluster humdata_id)
estimates store temp3b
xtreg coverstd pctchangestd, fe vce(cluster humdata_id)
estimates store temp3c

xtreg akpstd pctchangestd, vce(cluster humdata_id)
estimates store temp4a
xtreg akpstd pctchangestd $controls, vce(cluster humdata_id)
estimates store temp4b
xtreg akpstd pctchangestd, fe vce(cluster humdata_id)
estimates store temp4c

label variable pctchangestd "\textDelta Luminosity"

esttab temp2a temp2b temp2c temp3a temp3b temp3c temp4a temp4b temp4c, replace booktabs label numbers nomtitle nodepvars  b(%12.3f) p(%12.3f) r2(%12.3f) star(* 0.1 ** 0.05 *** 0.01) indicate("\midrule Controls = urban", label(\checkmark))  mgroups("\clb{c}{Devout}"  "\clb{c}{Cover}" "\clb{c}{AKP}", pattern(1 0 0 1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) prefoot("\addlinespace[1em]") posthead("\midrule")  sfmt(%12.0f) stat(N_clust N, labels("\midrule Districts" "District-Years") fmt(%12.0f %12.0f)) nonote noconstant nogaps  drop(literacy university _cons)

***************************************************
**Robustness checks across individuals
***************************************************

import delimited using "Livny_POQ2020_Individuals.csv", clear varnames(1)

global fixed_effects i.survey i.locale
global individual_controls female i.age_cat i.educ_cat i.income_cat sunni turkish 

*Driven by increases? Decreases?
bysort pctchange_dummy: pwcorr pctchangestd faststd relconservativestd coverstd akpstd, sig

reg faststd pctchangestd $fixed_effects if pctchange_dummy==0, cluster(humdata_id)
reg faststd pctchangestd $fixed_effects if pctchange_dummy==1, cluster(humdata_id)

reg relconservativestd pctchangestd $fixed_effects if pctchange_dummy==0, cluster(humdata_id)
reg relconservativestd pctchangestd $fixed_effects if pctchange_dummy==1, cluster(humdata_id)

reg coverstd pctchangestd $fixed_effects if pctchange_dummy==0, cluster(humdata_id)
reg coverstd pctchangestd $fixed_effects if pctchange_dummy==1, cluster(humdata_id)

reg akpstd pctchangestd $fixed_effects if pctchange_dummy==0, cluster(humdata_id)
reg akpstd pctchangestd $fixed_effects if pctchange_dummy==1, cluster(humdata_id)

*Similar in urban and rural settings?
bysort locale: pwcorr pctchangestd faststd relconservativestd coverstd akpstd, sig

***************************************************
**Robustness checks across districts
***************************************************

import delimited using "Livny_POQ2020_Districts.csv", clear varnames(1)

*Driven by increases? Decreases?
bysort pctchange_ramadan_dummy: pwcorr pctchangestd faststd relconservativestd coverstd akpstd, sig obs

reg faststd pctchangestd if pctchange_eleven_dummy==0, vce(cluster ilceid)
reg faststd pctchangestd if pctchange_eleven_dummy==1, vce(cluster ilceid)

reg relconservativestd pctchangestd if pctchange_eleven_dummy==0, vce(cluster ilceid)
reg relconservativestd pctchangestd if pctchange_eleven_dummy==1, vce(cluster ilceid)

reg coverstd pctchangestd if pctchange_eleven_dummy==0, vce(cluster ilceid)
reg coverstd pctchangestd if pctchange_eleven_dummy==1, vce(cluster ilceid)

reg akpstd pctchangestd if pctchange_eleven_dummy==0, vce(cluster ilceid)
reg akpstd pctchangestd if pctchange_eleven_dummy==1, vce(cluster ilceid)

*Similar in urban and rural settings?
ttest pctchange_ramadan_dummy, by(urban)
ttest pctchange_ramadan, by(urban)

